<?php
define('APPTYPEID', 2);
define('CURSCRIPT', 'index');
require './source/class/class_core.php';
$modarray = array('index','api','user','square','misc','vote');
$modswitch = array('vote'=>'110110');
//$modarray = array('ustbsu');
$modcachelist = array(
		'misc'=>array('smiley')
);
//$_G['mod']=$_GET['mod']
$mod = !in_array(C::app()->var['mod'], $modarray) ? 'index' : C::app()->var['mod'];
define('CURMODULE', $mod);//当前模块名
if($modswitch[CURMODULE]){
	$switch=str_split($modswitch);
	C::app()->init_db=$switch[0]?true:false;
	C::app()->init_setting=$switch[1]?true:false;
	C::app()->init_user=$switch[2]?true:false;
	C::app()->init_cron=$switch[3]?true:false;
	C::app()->init_session=$switch[4]?true:false;
	C::app()->init_misc=$switch[5]?true:false;
}
$cachelist = array();
if(isset($modcachelist[CURMODULE])) {
	$cachelist = $modcachelist[CURMODULE];//当前模块自摸快缓存
}
C::app()->cachelist = $cachelist;//加入到缓存列表,通过loadcache()读取
C::app()->init();
require DIR_ROOT.'./source/module/mod_'.$mod.'.php';

?>